#include <math.h>
#include <algorithm>
#include <winsock2.h>
#include "MySQL/mysql.h"

#include "CNpcFadeOutPacket.h"


CNpcFadeOutPacket::CNpcFadeOutPacket(CNpc* ptrNpc) {
	this->type = 0x38;
	this->size = 0x0A;

	
	memcpy(this->data, (char*)&ptrNpc->m_id,4);
	memcpy(this->data+4, (char*)&ptrNpc->m_id,4);
	this->data[0x0c-4] = 0x6b;
	this->data[0x0d-4] = 0x65;
	this->data[0x0e-4] = 0x73;
	this->data[0x0f-4] = 0x75;

	unsigned short targId = ptrNpc->getTargId();
	memcpy(this->data+0x10-4, &targId,2);
	memcpy(this->data+0x12-4, &targId,2);
	
}

CNpcFadeOutPacket::~CNpcFadeOutPacket(void)
{
}